/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('iframe_system_module', {
    ModuleID: {
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true
    },
    Name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    URL: {
      type: DataTypes.STRING(200),
      allowNull: true
    },
    UrlGoModuleID: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    ParentID: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    Sort: {
      type: DataTypes.INTEGER(11),
      allowNull: false
    },
    IsParent: {
      type: DataTypes.INTEGER(11),
      allowNull: false
    },
    Icon: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    Able: {
      type: DataTypes.STRING(200),
      allowNull: true
    },
    IsShowInMenu: {
      type: DataTypes.INTEGER(11),
      allowNull: false
    },
    Remark: {
      type: DataTypes.STRING(100),
      allowNull: true
    },
    IsShowLeftMenu: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '1'
    },
    DataOptions: {
      type: DataTypes.TEXT,
      allowNull: true
    }
  }, {
    tableName: 'iframe_system_module'
  });
};
